﻿namespace FineCollection.Const
{

    internal class ConstZeroList<T> : ConstList<T>
    {
        internal static readonly T[] zeroArray = new T[0];


        public static readonly ConstZeroList<T> Zero0 =
            new ConstZeroList<T>(0);

        public static readonly ConstZeroList<T> Zero1 =
            new ConstZeroList<T>(1);


        internal ConstZeroList(int firstIndex) 
            : base(firstIndex, zeroArray, 0, true)
        {}


        public override bool Contains(T item)
        {
            return false;
        }


        public override int CountOf(T item)
        {
            return 0;
        }


        public override int IndexOf(T item)
        {
            return int.MinValue;
        }


        public override ConstList<T> ToList()
        {
            return this;
        }


        public override string ToString()
        {
            return "[]";
        }


        public override int GetHashCode()
        {
            return 0;
        }
    }

}